-- ============================================================================
-- Copyright (c) 2004-2015 Dan Andrei STEFAN (danandrei.stefan@gmail.com)
-- ============================================================================
-- Author			 : Dan Andrei STEFAN
-- Create date		 : 25.08.2010
-- Module			 : Database Analysis & Performance Monitoring
-- ============================================================================

-----------------------------------------------------------------------------------------------------
--
-----------------------------------------------------------------------------------------------------
RAISERROR('Create table: [report].[htmlGraphics]', 10, 1) WITH NOWAIT
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[report].[htmlGraphics]') AND type in (N'U'))
DROP TABLE [report].[htmlGraphics]
GO
CREATE TABLE [report].[htmlGraphics]
(
	[id]										[int] IDENTITY (1, 1)NOT NULL,
	[name]										[nvarchar](32)		NOT NULL,	
	[reference_url]								[nvarchar](256)		NULL,
	[tooltip]									[nvarchar](256)		NULL,
	[image_data_base64]							[nvarchar](max)		NOT NULL,
	CONSTRAINT [PK_htmlGraphics] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY]
) ON [PRIMARY]
GO

-----------------------------------------------------------------------------------------------------
RAISERROR('		...insert default data', 10, 1) WITH NOWAIT
GO
SET NOCOUNT ON
GO
INSERT	INTO [report].[htmlGraphics]([name], [reference_url], [tooltip], [image_data_base64])
				  SELECT 'Logo' AS [name]	, NULL AS [reference_url], NULL AS [tooltip], N'<img style="border-style: none" alt="Logo" width="188" height="60" src=""/>' AS [image_data_base64]
		UNION ALL SELECT 'check-checked'	, NULL AS [reference_url], NULL AS [tooltip], N'<img style="border-style: none" alt="" src="" />' AS [image_data_base64]
		UNION ALL SELECT 'check-unchecked'	, NULL AS [reference_url], NULL AS [tooltip], N'<img style="border-style: none" alt="" src="" />' AS [image_data_base64]
		UNION ALL SELECT 'radio-checked'	, NULL AS [reference_url], NULL AS [tooltip], N'<img style="border-style: none" alt="" src="" />' AS [image_data_base64]
		UNION ALL SELECT 'radio-unchecked'	, NULL AS [reference_url], NULL AS [tooltip], N'<img style="border-style: none" alt="" src="" />' AS [image_data_base64]
GO
